package com.mikey.weather_push;

import com.mikey.weather_push.controller.Pusher;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;

@SpringBootApplication
@EnableScheduling//开启定时任务
public class WeatherPushApplication {

    public static void main(String[] args) {
        SpringApplication.run(WeatherPushApplication.class, args);
    }

    @Scheduled(cron = "0 0 7 * * ?")//定时早上7点推送
    public void push() {
        Pusher.push();
    }

}
